import time

from page.app_page_enter_home import AppPageEnterHome
from page.page_login import PageLogin
from page.page_search import PageSearch
from script import log
from tools import Tools


class TestSearch(object):
    def test_search_success(self,driver,login):
        self.page = PageSearch(driver)
        self.page.search_inputgoods("华为手机")
        time.sleep(3)
        self.result = self.page.get_search_result()
        log.info(f'搜索结果为：{self.result}')
        assert '套餐赠耳机' in self.result
        self.page.get_shot('search_success.png')



